﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using JTicket.BLL;

namespace JTicket.UI
{
    public partial class JT_TitleManager : RoleBase
    {
        public List<JTicket.Model.D_TitleInfo> _TitleInfo { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                Bind();
        }
        void Bind()
        {
            string kw = string.Empty;//搜索关键字
            int page = 0;
            int pages = 0;
            int len = 30;
            if (!string.IsNullOrEmpty(Request.QueryString["page"]))
            {
                page = int.Parse(Request.QueryString["page"]);
                kw = Request.QueryString["KeyWord"].ToString();
            }
            BLL.D_TitleInfo bllTitle = new BLL.D_TitleInfo();
            _TitleInfo = bllTitle.GetListByCurLevel(page, len, ref pages, kw);
            ScriptManager.RegisterStartupScript(
               this, typeof(Page), "pages", string.Format("var page={0};var pages={1};", page, pages), true);
        }
    }
}